using System;
using System.Collections.Generic;
using System.Text;
using ywxt.Common;

namespace DB_NH.DB_Model.ywxt
{
    /// <summary>
    /// 业务系统的项目信息
    /// </summary>
    [Serializable]
    public class t_project
    {
        #region 字段
        /// <summary>
        /// 项目ID
        /// </summary>
        public virtual string proj_id { get; set; }

        /// <summary>
        /// 项目编号
        /// </summary>
        public virtual string proj_code { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public virtual string proj_name { get; set; }

        /// <summary>
        /// 项目所属年份
        /// </summary>
        public virtual int ProjectYear { get; set; }

        /// <summary>
        /// 项目是否叶子节点
        /// </summary>
        public virtual int is_leaf { get; set; }

        /// <summary>
        /// 项目委托时间
        /// </summary>
        public virtual DateTime proj_wtsj { get; set; }

        /// <summary>
        /// 项目来源
        /// </summary>
        public virtual string proj_xmly { get; set; }

        /// <summary>
        /// 项目委托书编号
        /// </summary>
        public virtual string proj_wtsbh { get; set; }

        /// <summary>
        /// 项目中标通知书编号
        /// </summary>
        public virtual string proj_zbtzsbh { get; set; }

        /// <summary>
        /// 项目中标时间
        /// </summary>
        public virtual DateTime proj_zbsj { get; set; }

        /// <summary>
        /// 项目标的物名称
        /// </summary>
        public virtual string ProjectBDW { get; set; }

        /// <summary>
        /// 项目资金来源
        /// </summary>
        public virtual string ProjectZJLY { get; set; }

        /// <summary>
        /// 项目性质
        /// </summary>
        public virtual string ProjectXMXZ { get; set; }

        /// <summary>
        /// 项目类型
        /// </summary>
        public virtual string proj_xmlx_id { get; set; }

        /// <summary>
        /// 项目招标方式
        /// </summary>
        public virtual string ProjectZBFS { get; set; }

        /// <summary>
        /// 项目招标内容
        /// </summary>
        public virtual string ProjectZBNR { get; set; }

        /// <summary>
        /// 项目排序
        /// </summary>
        public virtual string proj_order_flag { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        public virtual int is_valid { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime create_date { get; set; }

        /// <summary>
        /// 项目所属部门
        /// </summary>
        public virtual t_sys_department department { get; set; }

        /// <summary>
        /// 项目创建用户
        /// </summary>
        public virtual t_sys_user Creator { get; set; }

        /// <summary>
        /// 项目关联的盖章申请记录
        /// </summary>
        public virtual IList<DB_Model.YWGZ.wf_ywgz> ywgzs { get; set; }
        
        /// <summary>
        /// 项目的专家抽取记录（多对多）
        /// </summary>
        public virtual IList<DB_Model.ZJCQ.ZJ_extract> proj_extracts { get; set; }

        /// <summary>
        /// 项目的专家抽取记录（多对多）
        /// </summary>
        public virtual IList<DB_Model.ZJCQ.ZJ_extract_bak> proj_extract_baks { get; set; }

        /// <summary>
        /// 项目的费用记录（一对多）
        /// </summary>
        public virtual IList<fy_detail> proj_fys { get; set; }

        /// <summary>
        /// 招标机构
        /// </summary>
        public virtual string proj_jg { get; set; }

        /// <summary>
        /// 级别
        /// </summary>
        public virtual int proj_level { get; set; }

        /// <summary>
        /// 状态代码
        /// </summary>
        public virtual string proj_status_code { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public virtual int proj_status { get; set; }

        /// <summary>
        /// 参与项目的投标人对应关系记录
        /// </summary>
        public virtual IList<ref_ProjectAndEnterprise> proj_Enterprises { get; set; }

        /// <summary>
        /// 项目内部分类：
        /// 1类项目、2类项目、3类项目
        /// </summary>
        public virtual string ProjectNBFL { get; set; }

        /// <summary>
        /// 项目外部编号：
        /// 用于保存公司外部编号
        /// </summary>
        public virtual string ProjectWBBH { get; set; }

        /// <summary>
        /// 上级项目的项目ID
        /// </summary>
        public virtual string pre_proj_id { get; set; }

        /// <summary>
        /// 项目业主
        /// </summary>
        public virtual Enterprise Owner { get; set; }

        /// <summary>
        /// 项目收费方式：
        /// 定率
        /// 定额
        /// 累进制
        /// 其他
        /// </summary>
        public virtual string proj_sffs { get; set; }

        /// <summary>
        /// 收费方式值
        /// </summary>
        public virtual string proj_sffsz { get; set; }

        /// <summary>
        /// 保证金收取方式：
        /// DL：定率；
        /// DE：定额；
        /// </summary>
        public virtual string proj_bzj_fs { get; set; }

        /// <summary>
        /// 保证金数值
        /// </summary>
        public virtual decimal proj_bzj { get; set; }

        /// <summary>
        /// 项目总投资
        /// </summary>
        public virtual decimal proj_ztz { get; set; }

        /// <summary>
        /// 项目总投资（美元）
        /// </summary>
        public virtual decimal proj_ztz_my { get; set; }

        /// <summary>
        /// 项目备注信息
        /// </summary>
        public virtual string ProjectRemark { get; set; }

        /// <summary>
        /// 项目的奖金申请
        /// </summary>
        public virtual IList<ProjectJJ.ProjectJJSQ> ProjectJJSQs { get; set; }

        /// <summary>
        /// 项目的奖金表
        /// </summary>
        public virtual IList<Finance.JJBForProject> ProjectJJBs { get; set; }

        /// <summary>
        /// 项目的时间计划安排
        /// </summary>
        public virtual IList<Project.RefProjectAndPlan> RefProjectAndPlans { get; set; }

        /// <summary>
        /// 项目的签到记录（一对多）
        /// </summary>
        public virtual IList<ProjectOpening.ProjectOpen_qdb> ProjectQDs { get; set; }

        /// <summary>
        /// 项目的开标记录表的列定义
        /// </summary>
        public virtual IList<ProjectOpening.ProjectOpenRow> ProjectOpenRows { get; set; }
        #endregion

        public t_project()
        {
            this.is_valid = 1;
            this.create_date = DateTime.Now;
            this.proj_id = Common.NewID();

            this.ywgzs = new List<DB_Model.YWGZ.wf_ywgz>();
            this.proj_extracts = new List<DB_Model.ZJCQ.ZJ_extract>();
            this.proj_extract_baks  = new List<DB_Model.ZJCQ.ZJ_extract_bak>();
            this.proj_fys = new List<fy_detail>();
            this.proj_Enterprises = new List<ref_ProjectAndEnterprise>();
            this.ProjectJJSQs = new List<ProjectJJ.ProjectJJSQ>();
            this.RefProjectAndPlans = new List<Project.RefProjectAndPlan>();

            //项目签到表
            this.ProjectQDs = new List<ProjectOpening.ProjectOpen_qdb>();

            //项目开标记录列定义
            this.ProjectOpenRows = new List<ProjectOpening.ProjectOpenRow>();

            //初始化奖金表申请
            this.ProjectJJBs = new List<Finance.JJBForProject>();
        }
    }
}
